lib/commit: Directly use FICLONE for payload link
authorJonathan Lebon <jonathan@jlebon.com>
Mon, 15 Aug 2022 17:54:35 +0000 (13:54 -0400)
committerJonathan Lebon <jonathan@jlebon.com>
Mon, 15 Aug 2022 18:00:08 +0000 (14:00 -0400)
commit93e47f88f486e5df1030066d0120b0db034ca6c8
tree7224f1ba61534dc22b00f71837a6c6802a11da5a
parent4471c252a9c92442f54e0e0df514efccc8779bdd
lib/commit: Directly use FICLONE for payload link

The idea of payload linking is to reflink between objects where
possible. Instead of relying on `glnx_regfile_copy_bytes` to hit the
`FICLONE` path, just call `FICLONE` directly. At that point in the code,
we've already established that the source and dest repos are on the same
filesystem and that it supports `FICLONE`.

Related: https://gitlab.gnome.org/GNOME/libglnx/-/merge_requests/41
Related: https://github.com/ostreedev/ostree/pull/2684#issuecomment-1204068437
src/libostree/ostree-repo-commit.c